<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>北京航天公司固定资产管理系统</title>
</head>
<body>
    <div class="layui-inline">
        <div class="layui-col-xs6 layui-col-md4">
            <blockquote class="layui-elem-quote" style="width: 1550px;">计划信息详情</blockquote><br>
        </div>
    </div>

    <form action="" id="FormID" class="layui-form">
        <div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 150px;">计划名称：</label>
                <div class="layui-input-inline">
                    <input type="" name="checkplan_name"  style="width: 261.988636px;" lay-verify="email" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 150px;">计划类型：</label>
                <div class="layui-input-inline">
                    <select name="checkplan_tid" lay-verify="required" lay-search="" >
                        <option value="">---请选择计划类型---</option>
                        <option th:each="checkType, CheckPlanType :${checkPlanTypeList}" th:value="${checkType.plan_type_id}" th:text="${checkType.plan_type_name}"></option>
                    </select>
                </div>
            </div>
        </div>
        <br><br>
        <div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 150px;">计划开始日期：</label>
                <div class="layui-input-inline">
                    <input type="date" name="checkstart_time"  style="width: 261.988636px;" lay-verify="email" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 150px;">计划结束日期：</label>
                <div class="layui-input-inline">
                    <input type="date" name="checkend_time"  style="width: 261.988636px;" lay-verify="email" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 150px;">计划负责人：</label>
                <div class="layui-input-inline">
                    <input type="text" name="parson_man"  style="width: 261.988636px;" lay-verify="email" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
    <br>





            <div class="layui-inline">
                <div class="layui-col-xs6 layui-col-md4">
                    <blockquote class="layui-elem-quote" style="width: 1550px;">盘点范围及提交日期</blockquote><br>
                </div>
            </div>
        <div>
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 150px;">盘点部门：</label>
                <div class="layui-input-inline">
                    <select name="deparment_id"  lay-verify="required" lay-search="" >
                        <option value="">---请选择盘点部门---</option>
                        <option value="" th:each="dep,Department :${departmentList}" th:value="${dep.did}" th:text="${dep.dname}"></option>
                    </select>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label" style="width: 150px;">资产类别：</label>
                <div class="layui-input-inline">
                    <select name="property_tid" id="ProType"  lay-filter="mySelectOrgProperty">
                        <option value="">---请选择资产类别---</option>
                        <option  th:each="proType,PropertyVo :${propertyVoList}" th:value="${proType.property_tid}" th:text="${proType.property_tname}"></option>
                    </select>
                </div>
            </div>
        </div>
            <br><br>
        <center>
            <button type="button" onchange="addCheck()" id="SubmitCheck" class="layui-btn layui-btn-primary">提交盘点计划</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </center>
   </form>

</body>
<script type="text/javascript" src="/js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="/layui/layui.all.js"></script>
<link rel="stylesheet" href="/layui/css/layui.css">
<script>
    $(function () {
        var form = layui.form;
        layui.use(['form', 'layedit', 'laydate'], function() {
            var layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate;

            //日期
            laydate.render({
                elem: '#date'
            });
        })
        function addCheck() {
          var formData =   $("#FormID").serialize();
        }
        
    })


    
    $("#SubmitCheck").click(function () {
        var formData = $("#FormID").serialize();
        console.log(formData)
        //询问框
        layer.confirm('您确定要完成此操作吗？', {
            btn: ['确定','取消'] //按钮
        }, function(){
            $.post("/CheckPlan/addCheckPlan?"+formData,function (res) {
                //初体验
                if(res=="ok"){
                    window.location.href="/jump/goShow"
                }
            });
        }, function(){
            layer.msg('谢谢你的谨慎！', {
                time: 20000, //20s后自动关闭
                btn: ['明白了', '知道了']
            });
        });

    })





</script>
</html>